package com.tepth.vehiclemaintenance.mvp.work.operator;

import com.tepth.vehiclemaintenance.bean.ChooseOperator;
import com.tepth.vehiclemaintenance.dataprovider.SuggestListProvider;
import com.tepth.vehiclemaintenance.net.ApiModel;
import com.tepth.vehiclemaintenance.net.Network;

import java.util.ArrayList;

import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;

/**
 * Created by TMVPHelper on 2017/05/15
 */
public class OperatorModel implements OperatorContract.Model {

    @Override
    public Observable<ApiModel<ArrayList<ChooseOperator>>> getAllSuggest(String authKey) {
            return Network.getApiService().getAllSuggests(authKey)
                    .subscribeOn(Schedulers.io())
                    .observeOn(AndroidSchedulers.mainThread());
    }
}